package best.driver.android.Map;

import java.io.Serializable;

public class LatLng implements Serializable {
    /**
     *
     */
    private static final long serialVersionUID = -5333035915525231490L;

    public double longitude;

    public double latitude;

    public LatLng() {

    }

    public LatLng(double latitude, double longitude) {
        this.latitude = latitude;
        this.longitude = longitude;
    }

//    public static LatLng fromGeoPoint(GeoPoint geoPoint) {
//        LatLng doublePoint = new LatLng(geoPoint.getLatitudeE6() / (double) 1E6, geoPoint.getLongitudeE6() / (double)
//                1E6);
//        return doublePoint;
//    }
//
//    public static GeoPoint getGeoPoint(double latitude, double longitude) {
//        return new GeoPoint((int) (latitude * 1E6), (int) (longitude * 1E6));
//    }
//
//    public GeoPoint toGeoPoint() {
//        return getGeoPoint(latitude, longitude);
//    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(String.format("%s=\"%s\"&", "longitude", longitude));
        sb.append(String.format("%s=\"%s\"&", "latitude", latitude));
        return sb.toString();
    }
}
